#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
#include <climits>
#define int long long 
#define x first 
#define y second 
using namespace std ;
typedef pair<int,int> PII;
const int N = 1e5 + 10;
//int a[N];
PII p[N];
struct node1
{
    int a,b;
}q[2020];
bool cmp1(node1 &x1,node1 &y1)
{
    return x1.a + x1.b < y1.a + y1.b;
}
void solve()
{
    int n;
    cin >> n;
    n *= 2;
    for(int i = 1; i <= n; i++)  cin >> q[i].a;
    for(int i = 1; i <= n; i++)  cin >> q[i].b;
    sort(q + 1 ,q + n + 1 , cmp1);
    int ans1 = 0;
    int ans2 = 0;
    for(int i = 1; i <= n; i++)
    {
        if(i % 2 == 1) 
        {
            ans1 += q[i].a;
        }
        else  
        {
            ans2 += q[i].b;
        }
    }
    cout << ans1 - ans2 << endl;
}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);
    int t = 1;
    //cin >> t;
    while(t -- ) solve();
    return 0;
}

/* a1  a2
   b1  b2
   如果先手选a1,后手只能选b2
   则为a1 - b2
   否则为a2 - b1
   a1 - b2 < a2 - b1
   得出a1 + b1 < a2 + b2即是最优策略 */